import { connect } from 'react-redux'
import { ListsItem } from '../style'

const List = (props) => {
  let { list } = props
  return (
    <div>
      {list.map((item, index) => {
        return <ListsItem imgUrl={item} key={index} />
      })}
    </div>
  )
}

const mapState = (state) => {
  return {
    list: state.getIn(['home', 'list']),
  }
}

export default connect(mapState, null)(List)
